{% extends "articles/base.html" %}

{% load static %}

{% block title %}Новости{% endblock %}

{% block content %}
  <div class="row">
    {% for article in object_list %}
      <div class="col-lg-4 col-sm-6 portfolio-item">
        <div class="card h-100">
          <a href="#"><img class="card-img-top" src="{% get_media_prefix %}{{ article.image }}" alt=""></a>
          <div class="card-body">
            <h4 class="card-title">
              <a href="#">{{ article.title }}</a>
            </h4>
            <p class="card-text">{{ article.text }}</p>
            {% for scope in article.scopes.all %}
              <span class="badge {% if scope.is_main %}badge-primary{% else %}badge-secondary{% endif %}">{{ scope.tag.name }}</span>
            {% endfor %}
            <div class="d-flex justify-content-between align-items-center"></div>
          </div>
        </div>
      </div>
    {% endfor %}
  </div>
{% endblock %}